{% if map_info %}
<script src="http://maps.google.com/maps?file=api&v=2&key={{ map_info.key }}" type="text/javascript"></script>
<div id="map"></div>
<script type="text/javascript">
	YAHOO.util.Event.addListener(window, "load", function() {
		if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map"));
			map.addControl(new GSmallMapControl());
			map.addControl(new GMapTypeControl());

			var point = new GLatLng({{ map_info.latitude }}, {{ map_info.longitude }});
			map.setCenter(point, 13);

			var marker = new GMarker(point);
			map.addOverlay(marker);

			GEvent.addListener(marker, "click", function() {
					marker.openInfoWindowHtml("{{ map_info.title|escapejs }}");
				});
		}
	});
	YAHOO.util.Event.addListener(window, "unload", GUnload);
</script>
{% endif %}
